﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using EzDesk.DesktopClient.ViewContract;

using EzDesk.Generic;

namespace EzDesk.DesktopClient.MessageModule
{
    /// <summary>
    /// Interaction logic for FeedItemView.xaml
    /// </summary>
    public partial class FeedItemView : UserControl, IFeedItemView
    {
        public event EventHandler<Generic.GenericEventArg<string>> OnNavigate;
        public event EventHandler SetAsRead;

        public object ViewModel
        {
            get
            {
                return this.DataContext;
            }
            set
            {
                this.DataContext = value;
            }
        }
        public FeedItemView()
        {

            InitializeComponent();
        }

        private void ContentControl_RequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            //OnNavigate.ExecuteMethod(null, "http://localhost:2604/Test.aspx");
            OnNavigate.ExecuteMethod(null, e.Uri.AbsoluteUri); 
        }

        private void SetToReadBtn_Click(object sender, RoutedEventArgs e)
        {
            SetAsRead.ExecuteMethod(sender, e);
        }

    }
}
